><

Setting JavaScript preferences



The JavaScript, font, color, and printing preferences let you customize the settings that control how the Script Editor behaves and appears, and how scripts appear in the Source view.

To set JavaScript preferences:

1 Choose Edit > Preferences.

2 Select the JavaScript icon () in the left pane of the Preferences dialog box.

3 Set the following preferences:

  • Enable Dragging of Marked Text to control internal drag-and-drop support.
  • Auto Indent to control the automatic indenting of lower level script elements.
  • Line Numbers to display line numbers at the left margin of the JavaScript Editor window.
  • Word Wrap to let the JavaScript code wrap in the JavaScript Editor window when it reaches the right margin of the window.
  • Tab Size to set the width of the indentation (in characters) added when you press the Tab key.

  • You can preview your settings in the preview pane at the bottom of the Preferences dialog box.

    To set Font preferences:

    1 Choose Edit > Preferences.

    2 In the Preferences dialog box, expand the JavaScript preferences in the left pane and select Font.

    3 Select a custom font, font size, and style for JavaScript code to override the default setting. This is the font used to display JavaScript code in the JavaScript Editor.

    To set Colors preferences (syntax highlighting):

    1 Choose Edit > Preferences.

    2 In the Preferences dialog box, expand the JavaScript preferences in the left pane and select Colors.

    3 Select Enable Syntax Highlighting to determine the default appearance of the different code elements in the JavaScript Editor.

    4 To choose a color for each code element, click in the color field for the element, choose a new color, and click OK.

    To set Printing preferences:

    1 Choose Edit > Preferences.

    2 In the Preferences dialog box, expand the JavaScript preferences in the left pane and select Printing.

    3 Set Printing preferences to control the default formatting for hardcopy printouts of the JavaScript code:

  • Select Printer Specific Settings to format the hardcopy printout by using syntax highlighting (useful on a color printer), applying bold for HTML elements to make them stand out, and adding line numbers to make individual lines of code easier to refer to.
  • Select Use Special Font for Printing to apply a custom font and style options for hardcopy printing.


  • Adding Interactivity > Using JavaScript > Setting JavaScript preferences